home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-08-23 | 3.3 KB | 97 lines |
- #
- # makefile for user-contributed/lbl/jpeg/lib
- #
-
- # This makefile is suitable for Unix-like systems with non-ANSI compilers.
- # If you have an ANSI compiler, makefile.ansi is a better starting point.
-
- LIBNAME = libjpeg.a
- LOCAL_INC = -I$(CCS_ROOT)/include $(CPPFLAGS)
- CFLAGS2 = $(LOCAL_INC) -DHAVE_UNSIGNED_CHAR -DHAVE_UNSIGNED_SHORT
- # -DMEM_STATS
- # This file is derived from makefile.unix for UNIX system
- # check SETUP file for different system
-
- # virtual source files (not present in distribution file, see SETUP)
- VIRTSOURCES= jmemsys.c
- # system-dependent implementations of virtual source files
- SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
- jmemdosa.asm
- # files included by source files
- INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
- # documentation, test, and support files
- DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
- MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
- makcjpeg.atari makdjpeg.atari makljpeg.atari makefile.mc5 \
- makefile.mc6 makefile.bcc makefile.mms makefile.vms makvms.opt
- OTHERFILES= ansi2knr.c ckconfig.c example.c
- TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
- DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
- $(OTHERFILES) $(TESTFILES)
- # objectfiles common to cjpeg and djpeg
- COMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o strmjpeg.o hread_jheader.o
- # compression objectfiles
- NOTUSED_COBJS = jrdgif.o jrdppm.o jrdrle.o
- CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
- jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdtarga.o
- COBJECTS= cjpeg.o
- # decompression objectfiles
- DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
- jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
- jpeg_r.o jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
- DOBJECTS= djpeg.o
- # These objectfiles are included in libjpeg.a
- LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-
- ANSI2KNR = ../ansi2knr
- PRGMS = cjpeg.out djpeg.out
-
- default: $(ANSI2KNR) $(LIBNAME)
- install: $(ANSI2KNR) $(LIBNAME)
-
- # This rule causes ansi2knr to be invoked. If you use this makefile,
- # make sure PROTO is not defined by jconfig.h.
-
- .c.o:
- $(ANSI2KNR) $*.c tmpansi.c
- $(COMPILEc) -c $(CFLAGS2) tmpansi.c -o $*.o
- $(RM) tmpansi.c
-
- $(ANSI2KNR): ansi2knr.c
- $(CC) $(CFLAGS) -o $(ANSI2KNR) ansi2knr.c
-
- $(PRGMS): $(COBJECTS) $(DOBJECTS)
- $(LINKc) $* $*.o $(LIBRARIE6) $(CPPFLAGS2) -lpixrect
-
- # libjpeg.a is useful if you are including the JPEG software in a larger
- # program; you'd include it in your link, rather than the individual modules.
- $(LIBNAME): $(ANSI2KNR) $(LIBOBJECTS)
- @rm -f $(LIBNAME) tmpansi.c
- ar cr $(LIBNAME) `$(LORDER) $(LIBOBJECTS) | $(TSORT)`;
- mv $(LIBNAME) $(LIBDIR)
- $(RANLIB) $(LIBDIR)/$(LIBNAME)
- @touch $(LIBNAME)
-
- jmemsys.c:
- echo You must select a system-dependent jmemsys.c file.
- echo Please read the SETUP directions.
- exit 1
-
- clean:
- rm -f *.o $(LIBNAME) ansi2knr core tmpansi.* testout.*
- clean-all: clean_all
-
- distribute:
- $(RM) jpegsrc.tar*
- tar cvf jpegsrc.tar $(DISTFILES)
- compress -v jpegsrc.tar
-
- test: cjpeg djpeg
- $(RM) testout.ppm testout.gif testout.jpg
- ./djpeg testorig.jpg >testout.ppm
- ./djpeg -gif testorig.jpg >testout.gif
- ./cjpeg testimg.ppm >testout.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.gif testout.gif
- cmp testimg.jpg testout.jpg
-